package com.empire.module.member.dal.mysql.presentation;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.member.dal.dataobject.presentation.PresentationDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.member.controller.admin.presentation.vo.*;

/**
 * 报告 Mapper
 *
 * @author 主席大人
 */
@Mapper
public interface PresentationMapper extends BaseMapperX<PresentationDO> {

    default PageResult<PresentationDO> selectPage(PresentationPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<PresentationDO>()
                .likeIfPresent(PresentationDO::getCreateDeptId, String.valueOf(reqVO.getCreateDeptId()))
                .likeIfPresent(PresentationDO::getName, reqVO.getName())
                .eqIfPresent(PresentationDO::getRemark, reqVO.getRemark())
                .orderByDesc(PresentationDO::getId));
    }

}